/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_salaryemployee
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_salaryemployee extends PO implements I_hrm_salaryemployee, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121004L;

    /** the default Constructor */
    public X_hrm_salaryemployee(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_salaryemployee (Properties ctx, int hrm_salaryemployee_ID, String trxName)
    {
      super (ctx, hrm_salaryemployee_ID, trxName);
      /** if (hrm_salaryemployee_ID == 0)
        {
			setC_BPartner_ID (0);
			sethrm_amountsalary (Env.ZERO);
			sethrm_salaryemployee_ID (0);
			sethrm_salaryincrement (Env.ZERO);
// 0
			sethrm_salarytype (null);
// 1
			setProcessed (false);
// N
			setStartDate (new Timestamp( System.currentTimeMillis() ));
        } */
    }

    /** Load Constructor */
    public X_hrm_salaryemployee (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_salaryemployee[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Description.
		@param Description 
		Optional short description of the record
	  */
	public void setDescription (String Description)
	{
		set_Value (COLUMNNAME_Description, Description);
	}

	/** Get Description.
		@return Optional short description of the record
	  */
	public String getDescription () 
	{
		return (String)get_Value(COLUMNNAME_Description);
	}

	/** Set End Date.
		@param EndDate 
		Last effective date (inclusive)
	  */
	public void setEndDate (Timestamp EndDate)
	{
		set_Value (COLUMNNAME_EndDate, EndDate);
	}

	/** Get End Date.
		@return Last effective date (inclusive)
	  */
	public Timestamp getEndDate () 
	{
		return (Timestamp)get_Value(COLUMNNAME_EndDate);
	}

	/** Set amount salary.
		@param hrm_amountsalary amount salary	  */
	public void sethrm_amountsalary (BigDecimal hrm_amountsalary)
	{
		set_Value (COLUMNNAME_hrm_amountsalary, hrm_amountsalary);
	}

	/** Get amount salary.
		@return amount salary	  */
	public BigDecimal gethrm_amountsalary () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_amountsalary);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_salaryemployee.
		@param hrm_salaryemployee_ID hrm_salaryemployee	  */
	public void sethrm_salaryemployee_ID (int hrm_salaryemployee_ID)
	{
		if (hrm_salaryemployee_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_salaryemployee_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_salaryemployee_ID, Integer.valueOf(hrm_salaryemployee_ID));
	}

	/** Get hrm_salaryemployee.
		@return hrm_salaryemployee	  */
	public int gethrm_salaryemployee_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_salaryemployee_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set salary increment.
		@param hrm_salaryincrement salary increment	  */
	public void sethrm_salaryincrement (BigDecimal hrm_salaryincrement)
	{
		set_Value (COLUMNNAME_hrm_salaryincrement, hrm_salaryincrement);
	}

	/** Get salary increment.
		@return salary increment	  */
	public BigDecimal gethrm_salaryincrement () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_salaryincrement);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public I_hrm_salaryrange gethrm_salaryrange() throws RuntimeException
    {
		return (I_hrm_salaryrange)MTable.get(getCtx(), I_hrm_salaryrange.Table_Name)
			.getPO(gethrm_salaryrange_ID(), get_TrxName());	}

	/** Set hrm_salaryrange.
		@param hrm_salaryrange_ID hrm_salaryrange	  */
	public void sethrm_salaryrange_ID (int hrm_salaryrange_ID)
	{
		if (hrm_salaryrange_ID < 1) 
			set_Value (COLUMNNAME_hrm_salaryrange_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_salaryrange_ID, Integer.valueOf(hrm_salaryrange_ID));
	}

	/** Get hrm_salaryrange.
		@return hrm_salaryrange	  */
	public int gethrm_salaryrange_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_salaryrange_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** hrm_salarytype AD_Reference_ID=1000084 */
	public static final int HRM_SALARYTYPE_AD_Reference_ID=1000084;
	/** inverse = 1 */
	public static final String HRM_SALARYTYPE_Inverse = "1";
	/** direct = 2 */
	public static final String HRM_SALARYTYPE_Direct = "2";
	/** Set hrm_salarytype.
		@param hrm_salarytype hrm_salarytype	  */
	public void sethrm_salarytype (String hrm_salarytype)
	{

		set_Value (COLUMNNAME_hrm_salarytype, hrm_salarytype);
	}

	/** Get hrm_salarytype.
		@return hrm_salarytype	  */
	public String gethrm_salarytype () 
	{
		return (String)get_Value(COLUMNNAME_hrm_salarytype);
	}

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Start Date.
		@param StartDate 
		First effective day (inclusive)
	  */
	public void setStartDate (Timestamp StartDate)
	{
		set_Value (COLUMNNAME_StartDate, StartDate);
	}

	/** Get Start Date.
		@return First effective day (inclusive)
	  */
	public Timestamp getStartDate () 
	{
		return (Timestamp)get_Value(COLUMNNAME_StartDate);
	}
}